/**
 * 支付相关API
 */

import {
	http,
	Method
} from "@/utils/request.js";



// /buyer/game/order/create 生成订单
// 支付订单生成
export function orderCreate(params) {
	return http.request({
		url: `/game/order/create`,
		method: Method.POST,
		params,
	});
}

// 更新支付成功状态
export function paySuccess(payload, params) {
	return http.request({
		url: `/game/order/paySuccess/${params.orderId}`,
		method: Method.POST,
		data: payload,

	});
}

// 更新支付失败状态
export function payFailed(data, params) {
	return http.request({
		url: `/game/order/payFailed`,
		method: Method.POST,
		data,
		params,
	});
}


export function payFailed2(data, params) {
	return http.request({
		url: `/game/order/payFailed2`,
		method: Method.POST,
		data,
		params,
	});
}